package com.fr.hiram.util;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

public class JettyStart {
	
	public static void main(String[] args) {
		Server server = new Server(8081);

		WebAppContext context = new WebAppContext();
		context.setDescriptor(EnvUtils.WEBREPORT_DIR + "/WEB-INF/classes/WEB-INF/web.xml");
		context.setResourceBase(EnvUtils.WEBREPORT_DIR);
		context.setContextPath("/WebReport");
		context.setParentLoaderPriority(true);

		server.setHandler(context);

		try {
			server.start();

			server.join();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
